import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

async function main() {
  await prisma.tag.createMany({
    data: [
      { userId: 0, name: '餐饮', sign: 'catering', kind: 'expenses', type: 'system' },
      { userId: 0, name: '快递', sign: 'express', kind: 'expenses', type: 'system' },
      { userId: 0, name: '维修', sign: 'repair', kind: 'expenses', type: 'system' },
      { userId: 0, name: '亲友', sign: 'relatives', kind: 'expenses', type: 'system' },
      { userId: 0, name: '彩票', sign: 'lottery', kind: 'expenses', type: 'system' },
      { userId: 0, name: '捐赠', sign: 'donate', kind: 'expenses', type: 'system' },
      { userId: 0, name: '办公', sign: 'office', kind: 'expenses', type: 'system' },
      { userId: 0, name: '旅行', sign: 'travel', kind: 'expenses', type: 'system' },
      { userId: 0, name: '数码', sign: 'digital-product', kind: 'expenses', type: 'system' },
      { userId: 0, name: '红包', sign: 'red-packet', kind: 'expenses', type: 'system' },
      { userId: 0, name: '礼物', sign: 'gift', kind: 'expenses', type: 'system' },
      { userId: 0, name: '学习', sign: 'study', kind: 'expenses', type: 'system' },
      { userId: 0, name: '汽车', sign: 'car', kind: 'expenses', type: 'system' },
      { userId: 0, name: '医疗', sign: 'medical', kind: 'expenses', type: 'system' },
      { userId: 0, name: '书籍', sign: 'books', kind: 'expenses', type: 'system' },
      { userId: 0, name: '社交', sign: 'social', kind: 'expenses', type: 'system' },
      { userId: 0, name: '烟酒', sign: 'tobacco-wine', kind: 'expenses', type: 'system' },
      { userId: 0, name: '宠物', sign: 'pet', kind: 'expenses', type: 'system' },
      { userId: 0, name: '购物', sign: 'shopping', kind: 'expenses', type: 'system' },
      { userId: 0, name: '孩子', sign: 'children', kind: 'expenses', type: 'system' },
      { userId: 0, name: '交通', sign: 'transportation', kind: 'expenses', type: 'system' },
      { userId: 0, name: '美容', sign: 'beauty', kind: 'expenses', type: 'system' },
      { userId: 0, name: '运动', sign: 'exercise', kind: 'expenses', type: 'system' },
      { userId: 0, name: '日用', sign: 'daily-expenses', kind: 'expenses', type: 'system' },
      { userId: 0, name: '长辈', sign: 'elder', kind: 'expenses', type: 'system' },
      { userId: 0, name: '通讯', sign: 'communication', kind: 'expenses', type: 'system' },
      { userId: 0, name: '娱乐', sign: 'entertainment', kind: 'expenses', type: 'system' },
      { userId: 0, name: '水果', sign: 'fruits', kind: 'expenses', type: 'system' },
      { userId: 0, name: '零食', sign: 'snacks', kind: 'expenses', type: 'system' },
      { userId: 0, name: '居家', sign: 'home', kind: 'expenses', type: 'system' },
      { userId: 0, name: '住房', sign: 'housing', kind: 'expenses', type: 'system' },
      { userId: 0, name: '服饰', sign: 'costume', kind: 'expenses', type: 'system' },
      { userId: 0, name: '蔬菜', sign: 'vegetable', kind: 'expenses', type: 'system' },
      { userId: 0, name: '工资', sign: 'salary', kind: 'income', type: 'system' },
      { userId: 0, name: '兼职', sign: 'part-time-job', kind: 'income', type: 'system' },
      { userId: 0, name: '理财', sign: 'money-management', kind: 'income', type: 'system' },
      { userId: 0, name: '礼金', sign: 'cash-gift', kind: 'income', type: 'system' },
      { userId: 0, name: '其他', sign: 'other-income', kind: 'income', type: 'system' },
      // { userId: 0, name: '设置', sign: 'setting', kind: 'expenses', type: 'system' },
    ],
    skipDuplicates: true
  });
}

main()
  .catch((e) => {
    console.error(e);
    process.exit(1);
  })
  .finally(async () => {
    await prisma.$disconnect();
  });
